package com.foreknow.demo9;

import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class Test {
    public static void main(String[] args) {
//        Scanner input = new Scanner(System.in);
//        List<Student> list = new ArrayList<>();
//        for(int i = 1;i<=3;i++){
//            System.out.println("请输入学号：");
//            int sid = input.nextInt();
//            System.out.println("请输入姓名：");
//            String name = input.next();
//            System.out.println("请输入电话：");
//            String phone = input.next();
//            System.out.println("请输入邮箱：");
//            String email = input.next();
//
//            Student student = new Student();
//            student.setSid(sid);
//            student.setName(name);
//            student.setPhone(phone);
//            student.setEmail(email);
//
//            list.add(student);
//        }
        //调用功能类中的方法
        Manager manager = new Manager();
//        manager.write(list,"student.txt");
        List<Student> li = manager.readFile("student.txt");
        for (Student s:li) {
            System.out.println(s.getName());
        }
    }
}
